package edu.gym4all.service.organizer;

import java.util.List;
import java.util.Map;

import android.content.Context;
import edu.gym4all.data.ExerciseDAO;
import edu.gym4all.data.sqlite.android.dao.SQLiteExerciseDAO;
import edu.gym4all.service.ExerciseEnum;
import edu.gym4all.service.ExerciseOrganizer;
import edu.gym4all.service.domain.Cardio;
import edu.gym4all.service.domain.Hypertrophy;
import edu.gym4all.service.domain.Training;
import edu.gym4all.service.enums.ShoulderEnum;

public class ExerciseOrganizerImpl implements ExerciseOrganizer {

	@Override
	public List<Hypertrophy> loadHyperExercises(Training training,
			Context context) {
		SQLiteExerciseDAO exerciseDAO = new SQLiteExerciseDAO();
		return exerciseDAO.findHyperExercise(training);
	}

	@Override
	public List<Cardio> loadCardioExercises(Training training, Context context) {
		ExerciseDAO exerciseDAO = new SQLiteExerciseDAO();
		return exerciseDAO.findCardioExercise(training);
	}

	public void populateMapExercises(Map<String, ExerciseEnum[]> map) {
		map.put("shoulder", ShoulderEnum.values());

	}

	@Override
	public Hypertrophy createExercise(ExerciseEnum exercise, int series,
			int reps, Training training) {
		Hypertrophy hyperExercise = new Hypertrophy(exercise, series, reps);
		training.addHyperExercise(hyperExercise);
		return hyperExercise;
	}

	@Override
	public Cardio createExercise(ExerciseEnum exercise, int time) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public boolean verifyTime(int time) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public Boolean verifySeriesReps(int series, int reps) {
		// TODO Auto-generated method stub
		return null;
	}
}
